﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Windvoice.Album.Model
{
    public class PhotoInfo
    {
        private int _ID;
        private string _Title;
        private string _Photo;
        private int _AlbumID;
        private DateTime _UploadTime;
        private int _Hits;
        private string _Keywords;

        public PhotoInfo()
        { }
         
        public PhotoInfo(DataRow row)
        {
            _ID = int.Parse(row["id"].ToString());
            _Title = row["title"].ToString();
            _Photo = row["photo"].ToString();
            _AlbumID = int.Parse(row["albumid"].ToString());
            _UploadTime = DateTime.Parse(row["uploadtime"].ToString());
            _Hits = int.Parse(row["hits"].ToString());
            _Keywords = row["keywords"].ToString();
        }

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        public string Title
        {
            get { return _Title; }
            set { _Title = value; }
        }
        public string Photo
        {
            get { return _Photo; }
            set { _Photo = value; }
        }
        public int AlbumID
        {
            get { return _AlbumID; }
            set { _AlbumID = value; }
        }
        public DateTime UploadTime
        {
            get { return _UploadTime; }
            set { _UploadTime = value; }
        }
        public int Hits
        {
            get { return _Hits; }
            set { _Hits = value; }
        }
        public string Keywords
        {
            get { return _Keywords; }
            set { _Keywords = value; }
        }

    }
}
